package com.entor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.entor.dao.StudentDao;
import com.entor.model.Role;
import com.entor.model.Student;
import com.entor.service.StudentService;
@Service
public class StudentServiceImpl implements StudentService{
	
	@Autowired
	private StudentDao sd;

	@Override
	public List<Student> find(Student s) {
		List<Student> list = sd.find(s);
		return list;
	}

	@Override
	public Student getByName(String name) {
		return sd.getByName(name);
	}

	@Override
	public int update(Student s) {
		return sd.update(s);
	}

	@Override
	public int delete(int id) {
		return sd.delete(id);
	}

	@Override
	public int insert(Student s) {
		int i = sd.insert(s);
		return i;
	}

	@Override
	public int insertRole(Role r) {
		int i = sd.insertRole(r);
		return i;
	}


}
